{
	name:"MirrorPoint",
	onInit(){
		this.ctrlIndex = -1
		this.mirror = true
	},
	onClick(pos,e,meta){
		let step = this.step
		if(step.isEmpty()&&meta.pathPoint){
			step.push(meta.pathPoint)
			this.hpoint(meta.pathPoint)
			this.toast("请选择中心线")
			return
		}
		if(step.isEmpty()){
			this.toast("请选择目标点")
			return 
		}
		let line = this.queryLines(pos)
		if(line)
			this.onCommit(line,pos)
		else
			this.toast("请选择中心线")
	},
	onCommit(line,pos){
		let {x,y,text} = this.step[0]
		let lPoint = this.getLM(line,pos)
		let mPoint = Math.mirrorPoint({
			x,y,
			a:lPoint.a+Math.PI/2
		},lPoint)
		mPoint.text = text

		this.step = [mPoint]
		this.commit(Action.Point,this.name)
	}
}